<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="start" onclick="startMusic()">打开<br>太阳</div>
    <canvas id='canvas'></canvas>
    <audio src="../music/openSun.mp3" crossOrigin="anonymous"></audio>
</body>
<script src="./index.js"></script>

</html>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    canvas{
        /* border: 1px solid red; */
        background-color: #2f3640;
    }

    body {
        overflow: hidden;
        position: relative;
    }

    .start{
        user-select: none;
        cursor: pointer;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 100px;
        height: 100px;
        border-radius: 50%;
        font-family: 楷体;
        font-size: 1.8rem;
        font-weight: 900;
        background: #e84118;
        border: 2px solid #81ecec;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 0 20px 20px #0984e3;
        opacity: 1;
        transition:opacity .3s ease-in-out;
    }

    body .disappear{
        opacity: 0;
    }
</style>